<?php
/**
 * Created by PhpStorm.
 * User: wangjie
 * Date: 2020/07/27
 * Time: 下午5:13
 */
namespace App\Api\Controllers\Yinka;


use App\Api\Controllers\Config\LinkageConfigController;
use App\Api\Controllers\Config\MyBankConfigController;
use App\Api\Controllers\Yinka\BaseController as base;
use App\Models\MemberList;
use App\Models\MemberSetJf;
use App\Models\MemberTpl;
use App\Models\YinkaStore;
use EasyWeChat\Factory;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class IndexController extends BaseController
{
    public function updateToken ()
    {
        $data = YinkaStore::where('expired_at', '<', time())->get();

        foreach ($data as $v) {
            $mch  = YinkaStore::where(['store_id' => $v->store_id])->first();
            base::getInstance($mch)->getToken($mch);
        }
    }
}
